from ronglian_sms_sdk import SmsSDK

accId = '8a216da8757784cd0175788a59370108'
accToken = '7f96f17788f745919c12eed55152f678'
appId = '8a216da8757784cd0175788a5a71010f'


def send_message(mobile, code, time):
    '''

    :param mobile:  手机号
    :param dates:   验证码
    :param code:
    :param time:    分钟
    :return:
    '''

    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = mobile
    datas = (code, time)
    resp = sdk.sendMessage(tid, mobile, datas)
    print(resp)


if __name__ == '__main__':
    # 【云通讯】您的验证码是{1}，请于{2}分钟内正确输入。其中{1}
    send_message('13546493199', '8888', '5')
